#ifndef ALARM_H
#define ALARM_H

#include <stdint.h>
#include <stdbool.h>
#include "board.h"

// 函数声明
void alarm_init(void);
bool alarm_set_time(uint8_t id, uint8_t hours, uint8_t minutes);
bool alarm_get_time(uint8_t id, tick_time_t *time);
bool alarm_enable(uint8_t id, bool enable);
bool alarm_is_enabled(uint8_t id);
bool alarm_is_ringing(uint8_t id);
void alarm_stop_ringing(uint8_t id);
void alarm_set_repeat(uint8_t id, bool repeat);
void alarm_set_repeat_days(uint8_t id, uint8_t days);
bool alarm_check_time(const rtc_time_t* current_time);
void alarm_process(void);

// 新增的函数声明
void alarm_setting(uint8_t id);
void alarm_setting_confirm(void);
void alarm_display_time(uint8_t id, bool colon_visible);
void alarm_handle_rotary_event(void);

#endif // ALARM_H
